#include <json/json.h>
#include <json/value.h>
#include <json/reader.h>
#include <iostream>
#include <string>

int main(void)
{
    Json::Value root;
    root["id"] = 1024;
    root["data"] = "hello world";
    std::string re = root.toStyledString();
    std::cout << "root: " << re << std::endl;

    Json::Value root2;
    Json::Reader reader;
    reader.parse(re, root2);
    std::cout << "root2: " << root2.toStyledString() << std::endl;

    return 0;
}